package com.shanzmoo.db.order.entity.dto;

import com.shanzmoo.base.bean.ValidList;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 门店订单物流发货信息
 *
 * @author: Gzhao 2020/12/16
 */
@Data
@ApiModel("门店订单物流发货信息")
public class LogisticsDeliverDto implements Serializable {
    private static final long serialVersionUID = 1758L;

    @NotBlank(message = "门店订单号不允许为空")
    @ApiModelProperty(value = "门店订单号", example = "A201214193070")
    private String orderNo;

    @ApiModelProperty(value = "物流单号信息")
    private ValidList<LogisticsDetail> logisticsDetailList;

    @ApiModelProperty(value = "发货商品信息")
    private ValidList<SkuDetail> skuDetailList;

    @Data
    @ApiModel("物流单号信息")
    public static class LogisticsDetail{

        @NotBlank(message = "物流单号不允许为空")
        @ApiModelProperty(value = "物流单号")
        private String logisticsNo;

        @NotBlank(message = "物流公司不允许为空")
        @ApiModelProperty(value = "物流公司")
        private String logisticsCompany;
    }

    @Data
    @ApiModel("发货商品信息")
    public static class SkuDetail{

        @NotBlank(message = "商品编码不允许为空")
        @ApiModelProperty(value = "商品编码")
        private String sku;

        @NotBlank(message = "商品名称不允许为空")
        @ApiModelProperty(value = "商品名称")
        private String skuName;

        @NotBlank(message = "商品单位不允许为空")
        @ApiModelProperty(value = "商品单位")
        private String unit;

        @NotBlank(message = "规格属性描述不允许为空")
        @ApiModelProperty(value = "规格属性描述")
        private String attributeDesc;

        @NotBlank(message = "商品数量不允许为空")
        @ApiModelProperty(value = "商品数量")
        private Integer skuNum;
    }
}
